package com.itheima.service;

import com.itheima.pojo.Dept;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


public interface DeptService {
    List<Dept> findAll();

    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
    void deleteById(Integer id);

    void add(Dept dept);

    Dept findById(Integer id);

    void update(Dept dept);
}
